package com.lap.framework.tools;

import org.apache.commons.codec.digest.DigestUtils;
import org.apache.commons.lang3.StringUtils;

/**
 * MD5工具
 *
 * @author Shuisheng Lao(劳水生)
 * @version 0.0.1
 */
public final class Md5Util {

  private Md5Util() {}

  public static String md5(String parameter) {
    return StringUtils.defaultIfBlank(DigestUtils.md5Hex(parameter), parameter);
  }
}
